package util;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class IOHelper {
	
	private static File result = new File("C:\\help.txt");
	private static BufferedWriter writer = null;
	static{
		try {
			writer = new BufferedWriter(new FileWriter(result));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void print(String str){
		try {
			writer.write(str);
			writer.newLine();
			writer.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void close(){
		if(writer != null){
			try {
				writer.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		
	}
}
